/*
file: bloc_activacio.h
*/


#ifndef __bo_activacio_h__ 
#define __bo_activacio_h__ 


#include <string.h>
#include "estructures.h"


void ba_ini(activation_bloc *ab);
int ba_new_element (activation_bloc *ab, Node_ba nou);
int ba_get_next(activation_bloc *ab, Node_ba *elem);

void ba_set_nom(activation_bloc *ab, char *nom, int type);

void ba_set_pos_parameters(activation_bloc *ab, int pos);
int ba_get_pos_parameters(activation_bloc *ab);

void ba_set_pos_data(activation_bloc *ab, int pos);
int ba_get_pos_data(activation_bloc *ab);

void ba_get_temp(activation_bloc *ab, char *nom, int tipus);
void ba_get_unary_op(char *opsrc, char *opdst, int tipus);
void ba_get_unary_cast(char *opdst, int tipus,int tipus2);
void ba_get_binary_op(char *opsrc, char *opdst, int tipus);
void ba_mostrar(activation_bloc *ab);
char get_leter_type(int tipus);

void ba_reset_out(activation_bloc *ab, char nom_arxiu[]);
void ba_write_out(activation_bloc *ab, char nom_arxiu[]);

int ba_obtenir_mida(int id);
int ba_get_posMem_Lliure(activation_bloc *ab);
int ba_Inc_MemLliure(activation_bloc *ab, int mem);

#endif /*__estructures_h__ */
